package com.ocm.pay.feign;

import com.ocm.core.launch.constant.AppConstant;

import com.ocm.core.tool.api.R;
import com.ocm.pay.bo.PayOrderBO;
import com.ocm.pay.bo.RefundOrderBO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(
	value = AppConstant.APPLICATION_PAY_NAME,
	fallback = IPayClientFallback.class
)
public interface IPayClient {
	String API_PREFIX = "/pay";

	@PostMapping(API_PREFIX+"/deal")
	R deal(@RequestBody PayOrderBO payOrderBO);

	@PostMapping(API_PREFIX+"/refund")
	R refund(@RequestBody RefundOrderBO refundOrderBO);

	@PostMapping(API_PREFIX+"/receiving")
    R receiving(@RequestBody Long orderId);
}

